package jgl.vajra.kingkong.part.home.contract;


import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import jgl.vajra.kingkong.bean.CityChoiceBean;
import jgl.vajra.kingkong.bean.OpenCityBean;
import jgl.vajra.kingkong.databinding.ActivityCityChoiceBinding;
import jgl.vajra.kingkong.widget.mvvm.model.BaseModel;
import jgl.vajra.kingkong.widget.mvvm.view.BaseMVVMView;
import jgl.vajra.kingkong.widget.mvvm.viewmodel.BaseViewModel;

public class CityChoiceContract {
    public abstract static class Model extends BaseModel {

        public abstract Observable<List<CityChoiceBean>> getAreaInfoData(Map<String, Object> map);

        public abstract Observable<OpenCityBean> getOpenCityData(Map<String, Object> map);
    }

    public interface View extends BaseMVVMView {

        void onSearch();

        void onCurrentPositioning();

        void returnAreaInfoBean(List<CityChoiceBean> cityChoiceBean);

        void onChoiceProvince(int position, OpenCityBean.ProvinceListBean itemData);

        void onChoiceArea(int position, OpenCityBean.ProvinceListBean.CityListBean itemData);

        void returnOpenCityData(OpenCityBean openCityBean);
    }

    public abstract static class ViewModel extends BaseViewModel<View, ActivityCityChoiceBinding, Model> {

        public abstract void getAreaInfoData(Map<String, Object> map);

        public abstract void getOpenCityData(Map<String, Object> map);
    }
}
